<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax请求json数据</title>
    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
</head>

<body>
<script>
$(function(){
$.ajax({
    url: '/HistoryData',
    type:'get',
    dataType:'json',
    success:function(data){
    //方法中传入的参数data为后台获取的数据
        /*alert(data)*/;
      /*  console.log(JSON.stringify(data));*/
        console.log(JSON.stringify(data.data.data));
        /*var dataTotel=data.data.chinaTotal.*/
    },
    error: function() {
        alert('请求失败');
    }
    })
})
</script>
</body>
</html>